package com.example.demo6.demos.service;

import com.example.demo6.demos.entity.Product;
import com.example.demo6.demos.mapper.IndexMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexService {

    @Autowired
    private IndexMapper indexMapper;

    public List<Product> index() {
        return indexMapper.findAll();
    }
}
